<style>
.pt-table-title {
    text-align: center;
    font-size: 30px;
    font-weight: 600;
    padding: 30px 10px 30px;
}
ul.pt-table-item {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-flow: wrap;
}
.pt-table-list {
    border: 1px solid #ccc;
    margin: -1px 0 0 -1px;
    display: flex;
    justify-content: left;
}
.pt-table-list.pt-table-row-2 {
    width: 50%;
}
.pt-table-list.pt-table-row-1 {
    width: 100%;
}
.pt-table-list.pt-table-row1show .pt-table-text {
    width: 100%;
}
.pt-table-list.pt-table-row1show.pt-table-row2show .pt-table-text {
    width: 50%;
}
.pt-table-list.pt-table-row1show.pt-table-row2show.pt-table-row3show .pt-table-text {
    width: 33.33%;
}
</style>
<div class="pt-table-template">
    <div class="pt-table-main">
        <div class="pt-table-head">
            <div class="pt-table-title">{{section.settings.title}}</div>
        </div>
        <div class="pt-table-body">
            <ul class="pt-table-item">
                {% for block in section.blocks %}
                <div class="pt-table-list pt-table-row-{{block.settings.row}} {%if block.settings.text1 != blank and block.settings.text1 != '' %}pt-table-row1show{%endif%} {%if block.settings.text2 != blank and block.settings.text2 != '' %}pt-table-row2show{%endif%} {%if block.settings.text3 != blank and block.settings.text3 != '' %}pt-table-row3show{%endif%}">                    
                    {%if block.settings.text1 != blank and block.settings.text1 != '' %}
                    <div class="pt-table-text pt-table-cc1">{{block.settings.text1}}</div>
                    {%endif%}
                    {%if block.settings.text2 != blank and block.settings.text2 != '' %}
                    <div class="pt-table-text pt-table-cc1">{{block.settings.text1}}</div>
                    {%endif%}
                    {%if block.settings.text3 != blank and block.settings.text3 != '' %}
                    <div class="pt-table-text pt-table-cc1">{{block.settings.text1}}</div>
                    {%endif%}
                </div>
                {% endfor %}
            </ul>
        </div>
    </div>
</div>
{% schema %}
{
  "name": "table",
  "class": "page-table",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "label": "标题"
    }
  ],
  "blocks": [
    {
      "type": "list",
      "name": "list",
      "settings": [
        {
          "type": "select",
          "id": "row",
          "label": "row",
          "options": [
            {
              "value": "2",
              "label": "50%"
            },
            {
              "value": "1",
              "label": "100%"
            }
          ],
          "default": "2"
        },
        {
          "type": "richtext",
          "id": "text1",
          "label": "TEXT 1"
        },
        {
          "type": "richtext",
          "id": "text2",
          "label": "TEXT 2"
        },
        {
          "type": "richtext",
          "id": "text3",
          "label": "TEXT 3"
        }
      ]
    }
  ],
  "presets": [
    {
      "category": "page - table",
      "name": "table"
    }
  ]
}
{% endschema %}
